<template>
  <mds-row>
    <mds-col :span="24">
      <div class="content-news">
        <h4 class="news-title">新闻列表</h4>
        <div class="news-right-list">
          <div class="list-info" v-for="item in newsRightList" :key="item.listId">
            <p class="ellipsis">{{item.title}}</p>
            <p>{{item.createTime}}</p>
          </div>
        </div>
      </div>
    </mds-col>
    <mds-col :span="24" style="margin-top:24px">
      <div class="content-quick">
        <h4 class="quick-title">快捷导航</h4>
        <div class="quick-list">
          <div class="quick-info" v-for="item in quickList" :key="item.ID">
            <div class="quick-info_text ellipsis">{{item.title}}</div>
          </div>
        </div>
      </div>
    </mds-col>
  </mds-row>
</template>

<script>
import { changeTime } from "@/utils/index";
export default {
  name: "",
  data() {
    return {
        newsRightList: [
            {
                listId: "112",
                title: "两大锦囊七条秘诀，助你开启高效远程…",
                createTime: "2020-08-10 11:20:30",
            },
            {
                listId: "116",
                title: "叮！来自领导力项目的结业证书已送达",
                createTime: "2020-08-10 11:20:30",
            },
            {
                listId: "115",
                title: "2020 差旅费报销制度",
                createTime: "2020-08-10 11:20:30",
            },
            {
                listId: "114",
                title: "2019采购管理操作制度_V5.010-16",
                createTime: "2020-08-10 11:20:30",
            },
            {
                listId: "113",
                title: "2020 差旅费报销制度",
                createTime: "2020-08-10 11:20:30",
            },
        ],
        quickList: [
                {
                    ID: "1",
                    title: "社保服务",
                },
                {
                    ID: "2",
                    title: "软件下载中心",
                },
                {
                    ID: "3",
                    title: "KPI",
                },
                {
                    ID: "4",
                    title: "电话会议",
                },
                {
                    ID: "5",
                    title: "医疗服务",
                },
                {
                    ID: "6",
                    title: "软件下载中…",
                },
                {
                    ID: "7",
                    title: "打印服务",
                },
                {
                    ID: "8",
                    title: "电话会议",
                },
            ],
    };
  },
  mounted(){
    this.newsRightList.map((item) => {
        item.createTime = changeTime(item.createTime);
    });
  },
  components: {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.news-right-list {
  width: 100%;
  padding: 18px 22px 24px 24px;
  box-sizing: border-box;
  .list-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    p:nth-child(1) {
      height: 22px;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(53, 64, 82, 1);
      line-height: 22px;
      flex: 1;
      margin-right: 8px;
    }
    p:nth-child(2) {
      height: 22px;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(127, 143, 164, 1);
      line-height: 22px;
      flex-shrink: 0;
    }
  }
  .list-info:last-child {
    margin-bottom: 0px;
  }
  .list-info:hover {
    cursor: pointer;
    p {
      color: #2c85ff;
    }
  }
}
.quick-list {
  width: calc(100% + 16px);
  display: flex;
  flex-wrap: wrap;
  padding: 24px 24px 36px 24px;
  box-sizing: border-box;
  overflow: hidden;
  .quick-info {
    margin-right: 16px;
    margin-bottom: 16px;
    padding: 8px;
    box-sizing: border-box;
    width: 26%;
    // flex: 1;
    // height: 36px;
    // line-height: 36px;
    background: rgba(250, 250, 253, 1);
    border-radius: 3px;
    overflow: hidden;
    .quick-info_text {
      font-size: 14px;
      width: 100%;
      height: 100%;
      text-align: center;
    }
  }
}
</style>
